#include"mergefile.h"



void testInsert()
{
	int a[] = {9,-1,8,5,2,1,7,3,2 };
	size_t size = sizeof(a) / sizeof(a[0]);
	InsertSort(a, size);
	PrintArray(a, size);
}
void tetsQuick()
{
	int a[] = { 65,56,72,99,86,25,34,66};
	size_t size = sizeof(a) / sizeof(a[0]);
	//QuickSort(a, 0,size-1);
	QuickSortNor(a, 0, size - 1);
	PrintArray(a, size);
}

void testCountSort()
{
	int a[] = { 1,1,3,3,-1,-1,9,9,8,8,4,4,1,1};
	size_t size = sizeof(a) / sizeof(a[0]);
	CountSort(a, size);
	PrintArray(a, size);


}

void testMergeSortFile()
{
	char name[10] = "sort.txt";
	MergeSortFile(name);
}

void testshellsort()
{
	int a[] = { 1,1,3,3,-1,-1,9,9,8,8,4,4,1,1 };
	size_t size = sizeof(a) / sizeof(a[0]);
	shellSort(a, size);
	PrintArray(a, size);
}

void testmergeSort()
{
	//int a[] = { 1,1,3,3,-1,-1,9,9,8,8,4,4,1,1 };
	int a[] = { 65,56,72,99,86,25,34,66 };
	size_t size = sizeof(a) / sizeof(a[0]);
	mergeSort(a, 0,size-1);
	PrintArray(a, size);
}

void testmergeSortNor()
{
	int a[] = { 1,1,3,3,-1,-1,9,9,8,8,4,4,1,1 };
	//int a[] = { 65,56,72,99,86,25,34,66 };
	size_t size = sizeof(a) / sizeof(a[0]);
	mergeSortNor(a, 0, size - 1);
	PrintArray(a, size);
}

void testBubbleSort()
{
	//int a[] = { 65,56,72,99,86,25,34,66 };
	int a[] = { 1,1,3,3,-1,-1,9,9,8,8,4,4,1,1 };
	size_t size = sizeof(a) / sizeof(a[0]);
	BubbleSort(a, size);
	PrintArray(a, size);

}

void testSelectSort()
{
	int a[] = { 1,1,3,3,-1,-1,9,9,8,8,4,4,1,1 };
	size_t size = sizeof(a) / sizeof(a[0]);
	SelectSort(a, size);
	PrintArray(a, size);

}


int main()
{
	//testCountSort();
	//testInsert();
	//tetsQuick();
	//testMergeSortFile();
	//testshellsort();
	//testmergeSort();
	//testmergeSortNor();
	//testBubbleSort();
	testSelectSort();
	return 0;
}